package controladores;

import java.io.Serializable;

import modelo.GestaoAplicacao;

import com.example.rm.teste.R;

import android.os.Bundle;
import android.content.Context;
import android.content.Intent;
import android.view.Menu;
import android.view.View;


public class Def extends MenuPrincipal implements Serializable {

	final Context context = this;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_def);
	//	estruturasLer = (GestaoAplicacao) getIntent().getSerializableExtra(MenuPrincipal.estruturasNLidas);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.def, menu);
		
		return true;
	}
	
	public void onClickUtilizadores(View v){
		Intent intent1 = new Intent(getApplicationContext(), GerirUtilizadores.class);
		intent1.putExtra(estruturasLidas, estruturasLer);
		startActivity(intent1);
	}
	
	public void onClickIdiomas(View v){
		Intent intent2 = new Intent(getApplicationContext(), Idioma.class);
		startActivity(intent2);
	
	}

	
	public void onClickBackup(View v){
		Intent intent5 = new Intent(getApplicationContext(), Backup.class);
		startActivity(intent5);
		
	}
	
	public void onClickFeedback(View v){
		
		
		Intent intent6 = new Intent(Intent.ACTION_SEND);
		intent6.setType("plain/text");
		intent6.putExtra(Intent.EXTRA_EMAIL, new String[] { "santos.marisa88@gmail.com" });
		intent6.putExtra(Intent.EXTRA_SUBJECT, "FeedBack");
		intent6.putExtra(Intent.EXTRA_TEXT, "");
		startActivity(Intent.createChooser(intent6, ""));
	}
}

